Optimal. Leaf size=75 \[ -\frac {2 a \log (\tan (c+d x))}{b^3 d}-\frac {2 a \log (a \cot (c+d x)+b)}{b^3 d}+\frac {\frac {a}{b^2}+\frac {1}{a}}{d (a \cot (c+d x)+b)}+\frac {\tan (c+d x)}{b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3088, 894} \[ \frac {\frac {a}{b^2}+\frac {1}{a}}{d (a \cot (c+d x)+b)}-\frac {2 a \log (\tan (c+d x))}{b^3 d}-\frac {2 a \log (a \cot (c+d x)+b)}{b^3 d}+\frac {\tan (c+d x)}{b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 894
Rule 3088
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{(a \cos (c+d x)+b \sin (c+d x))^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1+x^2}{x^2 (b+a x)^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {1}{b^2 x^2}-\frac {2 a}{b^3 x}+\frac {a^2+b^2}{b^2 (b+a x)^2}+\frac {2 a^2}{b^3 (b+a x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {\frac {1}{a}+\frac {a}{b^2}}{d (b+a \cot (c+d x))}-\frac {2 a \log (b+a \cot (c+d x))}{b^3 d}-\frac {2 a \log (\tan (c+d x))}{b^3 d}+\frac {\tan (c+d x)}{b^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.27, size = 51, normalized size = 0.68 \[ \frac {-\frac {a^2+b^2}{a+b \tan (c+d x)}-2 a \log (a+b \tan (c+d x))+b \tan (c+d x)}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.48, size = 178, normalized size = 2.37 \[ -\frac {2 \, b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b^{2} + {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} \cos \left (d x + c\right )^{2} + a b \cos \left (d x + c\right ) \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right )}{a b^{3} d \cos \left (d x + c\right )^{2} + b^{4} d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 71, normalized size = 0.95 \[ -\frac {\frac {2 \, a \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}} - \frac {2 \, a b \tan \left (d x + c\right ) + a^{2} - b^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.31, size = 78, normalized size = 1.04 \[ \frac {\tan \left (d x +c \right )}{b^{2} d}-\frac {2 a \ln \left (a +b \tan \left (d x +c \right )\right )}{d \,b^{3}}-\frac {a^{2}}{d \,b^{3} \left (a +b \tan \left (d x +c \right )\right )}-\frac {1}{d b \left (a +b \tan \left (d x +c \right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 60, normalized size = 0.80 \[ -\frac {\frac {a^{2} + b^{2}}{b^{4} \tan \left (d x + c\right ) + a b^{3}} + \frac {2 \, a \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{3}} - \frac {\tan \left (d x + c\right )}{b^{2}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.36, size = 382, normalized size = 5.09 \[ \frac {\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,a^2+b^2\right )}{a\,b^2}+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2+b^2\right )}{a\,b^2}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )}-\frac {4\,a\,\mathrm {atanh}\left (\frac {64\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{64\,a^3-64\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {128\,a^5}{b^2}-\frac {128\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {128\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}-\frac {64\,a^3}{64\,a^3-64\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {128\,a^5}{b^2}-\frac {128\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b^2}+\frac {128\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{b}}+\frac {128\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{64\,a^3\,b+\frac {128\,a^5}{b}+128\,a^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {128\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{b}-64\,a^3\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{b^3\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________